package com.hornsun.data.constant.types;

/**
 * Created by 编译中... on 2018/8/14.
 */
public enum LineStatus {
    OFFLINE(0,"离线"),
    ONLINE(1,"在线"),
    OFFLINE_AUTH(2,"离线授权");

    private Integer type;
    private String name;

    LineStatus(Integer type , String name){this.type=type;this.name=name;}

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static LineStatus getByName(String name) {
        for (LineStatus lineStatus : values()) {
            if (lineStatus.name.equals(name) ) {
                return lineStatus;
            }
        }
        return null;
    }
}
